<template>
	<view class="advantage">
		<view class="top flex justify-between align-center">
			<view class="left">
				{{titleName.name}}
			</view>
			<view class="right flex align-center" @click="linkFrom">
				<view class="icon flex justify-center align-center" :style="{'width': `${titleName.wh}rpx`, 'height':`${titleName.wh}rpx`}">
					<image :src="titleName.src" mode=""></image>
				</view>
				<view class="editor">
					{{titleName.operation}}
				</view>
			</view>
		</view>
		<slot></slot>
	</view>
</template>

<script>
	export default {
		name: "onlineResume",
		props: {
			titleName: {
				type: Object
			},
			it :{
				type: Object
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			//在线简历编辑和添加
			linkFrom(){
				switch (this.titleName.id){
					case 0:
					console.log(this.it)
					uni.navigateTo({
						url:'/pagesB/advantageFrom/advantageFrom?resumeListId=' + JSON.stringify(this.it)
					})
					break;
					case 1:
					uni.navigateTo({
						url:'/pagesB/jobFrom/jobFrom'
					})
					break;
					case 2:
					uni.navigateTo({
						url:'/pagesB/workExperienceFrom/workExperienceFrom'
					})
					break;
					case 3:
					uni.navigateTo({
						url:'/pagesB/projectExperienceFrom/projectExperienceFrom'
					})
					break;
					case 4:
					uni.navigateTo({
						url:'/pagesB/educationExperienceFrom/educationExperienceFrom'
					})
					break;
				}
			}
		}
	}
</script>

<style lang="scss">
	.advantage {
		padding-top: 20rpx;

		.top {
			.left {
				font-weight: bold;
				color: #333333;
				font-size: 28rpx;
			}

			.right {
				.icon {
					margin-right: 10rpx;
				}

				.editor {
					font-weight: 400;
					color: #333333;
					font-size: 28rpx;
				}
			}
		}
	}
</style>
